package some

import (
	"gitee.com/thubcc/p2pgit/classedpack"
	"gitee.com/thubcc/p2pgit/classify"
	"gitee.com/thubcc/p2pgit/types"
)

//ByteClassedPackFile byte classify
func ByteClassedPackFile(dir string) (gs types.SomeGeter) {
	for i := 0; i < 256; i++ {
		g := &classedpack.File{
			C: &classify.BasicClassify{
				Prefix: uint64(i),
				BitLen: 8,
			},
			Dir: dir,
		}
		gs = append(gs, g)
	}
	return
}

//HexClassedPackFile byte classify
func HexClassedPackFile(dir string) (gs types.SomeGeter) {
	for i := 0; i < 16; i++ {
		g := &classedpack.File{
			C: &classify.BasicClassify{
				Prefix: uint64(i),
				BitLen: 4,
			},
			Dir: dir,
		}
		var ig types.Geter = g
		gs = append(gs, ig)
	}
	return
}
